package com.zdw.oauth.dto;

import com.zdw.common.parent.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 *
 * </p>
 *
 * @author 卓德文
 * @since 2023-07-17
 */
@Getter
@Setter
@ApiModel(value = "RoleEntity对象", description = "")
public class RoleAddDto extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("角色编码")
    @NotBlank(message = "角色编码不能为空")
    private String code;

    @ApiModelProperty("角色名称")
    @NotBlank(message = "角色名称不能为空")
    private String name;

    @ApiModelProperty("父角色ID")
    @NotNull(message = "请选择上级角色")
    private Integer parentId = 0;

    @ApiModelProperty("状态(0:启用;1:禁用)")
    @NotNull(message = "请选择状态")
    private Integer state;

}
